
const Home = r => require.ensure([], () => r(require('@/components/Home')), 'Home');
const Detail = r => require.ensure([], () => r(require('@/components/Detail')), 'Detail');
const Login = r => require.ensure([], () => r(require('@/components/Login')), 'Login');
const author = r => require.ensure([], () => r(require('@/components/author')), 'author');
const redirect = r => require.ensure([], () => r(require('@/components/redirect')), 'redirect');

const routers = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  {
    path: '/author',
    name: 'author',
    component: author
  },
  {
    path: '/redirect',
    name: 'redirect',
    component: redirect
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/detail/:id',
    name: 'detail',
    component: Detail,
    // meta:{
    //   requiresAuth:true
    // }
  }
];
export default routers;
